

#ifndef __CE_PORTAL_H__
#define __CE_PORTAL_H__

#include <export.h>
#include <iobject.h>
#include <vector>
#include <math/vector.h>

class ceSector;

/**
 * \addtogroup scene
 * @{
 */
/**
 * @brief A portal connecting to adjacent sectors
 */
class CE_API cePortal : public iObject
{
  CE_OBJECT
private:
  ceSector*	_sector[2];

	bool			_open;

	std::vector<ceVector3f>	_vertices;

public:
  cePortal (ceSector* sector0 = 0, ceSector* sector1 = 0);
  virtual ~cePortal ();

  void SetSector(unsigned i, ceSector* sector);
  ceSector* GetSector (unsigned i);
  const ceSector* GetSector (unsigned i) const;

  ceSector* GetSector (const ceSector* other);
  const ceSector* GetSector (const ceSector* other) const;

	void SetOpen (bool open);
	bool IsOpen () const;

	void ClearVertices ();
	void AddVector (const ceVector3f& vertex);
	const ceVector3f* GetVertices () const;
	unsigned GetNumberOfVertices () const;

};

/** @} */

#endif /* ! __CE_PORTAL_H__ */
